cmake_minimum_required(VERSION 3.0)

project(protocol_connection_test)

add_definitions(-std=c++14 -Wall -Wshadow -g)

include_directories(./)
include_directories(./../)
include_directories(./../../)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set(test_http_protocol_operation_src_list
  ./test_http_protocol_operation.cpp
  ./../http_protocol_operation.cpp
  ./../protocol_connection.cpp
  ./../../protocol_center/protocol.center.cpp
  ./../../protocol_center/protocol_parser.cpp
  ./../../http_protocol/http_protocol_parser.cpp
  ./../../http_protocol/http_protocol_msg.cpp
  ./../../socket_module/socket_address.cpp
  ./../../socket_module/tcp_socket_connection.cpp
  ./../../socket_module/tls_socket_connection.cpp
  ./../../socket_module/tls_socket_operate.cpp
  ./../../socket_module/socket_channel.cpp
  ./../../socket_module/socket_description.cpp
  ./../../socket_module/socket_connection_util.cpp
  ./../../socket_module/udp_socket_connection.cpp
  ./../../socket_module/socket_util.cpp
  ./../../loop_module/loop.cpp
  ./../../io_reuse_module/io_epoll.cpp
  ./../../io_reuse_module/io_poll.cpp
  ./../../io_reuse_module/io_reuse_module.cpp
  ./../../write_read_module/buffer.cpp
  ./../../description_module/description_util.cpp
)

set(test_hls_protocol_operation_src_list
  ./test_hls_protocol_operation.cpp
  ./../hls_protocol_operation.cpp
  ./../http_protocol_operation.cpp
  ./../protocol_connection.cpp
  ./../../protocol_center/protocol.center.cpp
  ./../../protocol_center/protocol_parser.cpp
  ./../../http_protocol/http_protocol_parser.cpp
  ./../../http_protocol/http_protocol_msg.cpp
  ./../../hls_protocol/hls_m3u8_message.cpp
  ./../../hls_protocol/hls_m3u8_parser.cpp
  ./../../socket_module/socket_address.cpp
  ./../../socket_module/tcp_socket_connection.cpp
  ./../../socket_module/tls_socket_connection.cpp
  ./../../socket_module/tls_socket_operate.cpp
  ./../../socket_module/socket_channel.cpp
  ./../../socket_module/socket_description.cpp
  ./../../loop_module/loop.cpp
  ./../../io_reuse_module/io_epoll.cpp
  ./../../io_reuse_module/io_poll.cpp
  ./../../io_reuse_module/io_reuse_module.cpp
  ./../../write_read_module/buffer.cpp
  ./../../description_module/description_util.cpp
)

add_executable(TEST_HTTP_PROTOCOL_OPERATION ${test_http_protocol_operation_src_list})
add_executable(TEST_HLS_PROTOCOL_OPERATION  ${test_hls_protocol_operation_src_list})

set(libs gtest gtest_main gtest ssl crypto pthread)

target_link_libraries(TEST_HTTP_PROTOCOL_OPERATION ${libs})
target_link_libraries(TEST_HLS_PROTOCOL_OPERATION  ${libs})





